{% extends "base.html" %}
{% block subtitle %}
{%   if account.trusted %}
Settings
{%   else %}
Link Account
{%   endif %}
{% endblock %}
{% block header %}
{{ block.super }}:
{%   if account.trusted %}
Settings
{%   else %}
Link Account
{%   endif %}
{% endblock %}
{% block doc %}
{%   if account.trusted %}
<fb:tabs>
  <fb:tab-item href="/ircquotes" title="Record a Quote"/>
  <fb:tab-item href="/ircquotes/link-account" title="Settings" selected="true"/>
</fb:tabs>
<fb:editor action="/ircquotes/link-account">
  <fb:editor-custom label="Linked account">
    <a href="/ircquotes/view-account?name={{ account.name|urlencode }}">{{ account.name|escape }}</a>
    [<a href="/ircquotes/link-account?clear=1">Unlink</a>]
  </fb:editor-custom>
</fb:editor>
{%   else %}
<fb:editor action="/ircquotes/link-account">
  <center style="font-weight:bold">
    Sign into IQ using the form below.
  </center>
  <fb:editor-text label="IQ Account Name" name="name"/>
  <fb:editor-custom label="Password">
    <input type="password" name="password"/>
  </fb:editor-custom>
  <fb:editor-buttonset>
    <fb:editor-button value="Link to Facebook"/>
    <fb:editor-cancel value="Cancel" href="/ircquotes"/>
  </fb:editor-buttonset>
</fb:editor>
{%   endif %}
{% endblock %}
